package com.zzzyh.forumsystemclient.dao;

import com.zzzyh.forumsystemclient.model.Comment;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommentMapper {
    int insert(Comment row);

    int insertSelective(Comment row);

    Comment selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Comment row);

    int updateByPrimaryKeyWithBLOBs(Comment row);

    int updateByPrimaryKey(Comment row);

    List<Comment> list(@Param("offset")int offset, @Param("pageSize") int pageSize, @Param("articleId") Long articleId);

    Integer total(Long articleId);

    List<Comment> getCommentList(@Param("offset")Integer offset, @Param("pageSize")Integer pageSize,
                                 @Param("userId")Integer id);

    Integer getTotalByUserId(Integer id);

    List<Comment> myReply(@Param("userId") Integer id, @Param("offset") Integer offset, @Param("pageSize")Integer pageSize,
                          @Param("title")String title);

    Integer getReplyTotal(Integer id);

    void delMyComment(Integer commentId);
}